@extends('admin.common.base-master')

@section('html-head')
    <link href="{{url('css/admin/pagenum.css')}}" rel="stylesheet" />

@endsection

@section('html-body')
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="{{route('Admin.Home.topicAnswerList')}}">答题管理</a>
            <em></em>
            <a href="#">答题详情</a>
        </div>

        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>题目</th>
                    <th>是否答对</th>
                </tr>
                </thead>
                <tbody>
                @if(count($topicAnswerWrite) > 0)
                    @foreach($topicAnswerWrite as $key=>$answers)
                        <tr id="classify_{{$answers->id}}">
                            <td>{{$answers->id}}</td>
                            <td>{{$answers->t_id}}</td>
                            <td>
                                @if($answers->fen !== 0)
                                    <p style="color:green;">回答正确</p>
                                @else
                                    <p style="color:red;">回答错误</p>
                                @endif
                            </td>
                        </tr>
                    @endforeach
                @endif
                </tbody>
            </table>
        </div>
        <div class="pagelist" style="text-align: center;">
            <?php echo $topicAnswerWrite->appends(['id'=>$id])->render(); ?>
        </div>
    </div>

@endsection